package com.bwie.controller;

import com.bwie.service.TbBrandService;
import com.bwie.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/brand/brand")
public class TbBrandController {
    @Autowired
    TbBrandService tbBrandService;

    /***
     *@Description:品牌下拉框
     * @return com.bwie.utils.R
     * @author 26440
     *@date 2024/6/17 11:12
     *
     */
    @PostMapping("/getBrandList")
    public R getBrandList() {
        return tbBrandService.getBrandList();
    }
    @PostMapping("/getBrandById/{brandId}")
    public R getBrandById(@PathVariable(name = "brandId") Integer brandId) {
        System.out.println("郭祥真帅");
        return tbBrandService.getBrandById(brandId);
    }
}
